package com.fortune.dao;

import com.fortune.dto.in.driverOrder.DriverOrderPayedDto;
import com.fortune.entity.DriverOrderInfoDetailGy;
import com.fortune.vo.driverOrder.DriverOrderDetail;
import com.fortune.vo.driverOrder.DriverPaymentInfor;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

public interface DriverOrderDao {
    /**
     * 查询配送清单
     * @param mid
     * @param did
     * @param deliveryUser
     * @return
     */
    List<DriverOrderInfoDetailGy> findListDriverOrderInfoDetailGy(@Param("mid") String mid,
                                                                  @Param("did") String did,
                                                                  @Param("deliveryUser") String deliveryUser);

    /**
     * 查询订单详情
     * @param mid
     * @param did
     * @param clientId
     * @param orderId
     * @return
     */
    DriverOrderDetail findDriverOrderDetail(@Param("mid") String mid,
                                            @Param("did") String did,
                                            @Param("clientId") String clientId,
                                            @Param("orderId") String orderId);

    /**
     * 查询支付信息
     * @param mid
     * @param did
     * @param clientId
     * @return
     */
    DriverPaymentInfor findDriverPaymentInfor(@Param("mid") String mid,
                                              @Param("did") String did,
                                              @Param("clientId") String clientId);

    /**
     * 修改订单状态（变为已付款）
     * @param mid
     * @param did
     * @return
     */
    int editDriverPaymentStaus(@Param("mid") String mid,
                               @Param("did") String did,
                               @Param("payDto") DriverOrderPayedDto payDto);

    /**
     * 修改回收箱数和金额
     * @param mid
     * @param did
     * @param clientId
     * @param orderId
     * @param no
     * @return
     */
    int editOrderDelivery(@Param("mid") String mid,
                          @Param("did") String did,
                          @Param("clientId") String clientId,
                          @Param("orderId") String orderId,
                          @Param("no") String no,
                          @Param("backBoxNum") float backBoxNum,
                          @Param("dprice") BigDecimal dprice);
}
